package com.sptpc.pm2.ui.home;

import android.os.Bundle;

import android.view.LayoutInflater;

import android.view.View;
import android.view.ViewGroup;


import androidx.annotation.NonNull;

import androidx.fragment.app.Fragment;

import androidx.viewbinding.ViewBinding;
import androidx.viewpager2.widget.ViewPager2;

import com.sptpc.pm2.R;

import com.sptpc.pm2.databinding.FragmentHomeBinding;
import com.sptpc.pm2.ui.home.model.BannerAdapter;

public class HomeFragment extends Fragment implements View.OnClickListener {
    private ViewBinding binding;

    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
       init();
       return binding.getRoot();
    }

    private void init(){
        binding = FragmentHomeBinding.inflate(getLayoutInflater());
        BannerAdapter viewPagerAdapter = new BannerAdapter();
        ViewPager2 viewPager2 = binding.getRoot().findViewById(R.id.info_Swiper);
        viewPager2.setAdapter(viewPagerAdapter);
    }

    @Override
    public void onClick(View v) {

    }
}
